<?php
/**
 * System_Model_EmployeeRole
 *
 * @author mmxie
 * @copyright Copyright (c) 2009 Green Shore (http://www.iwgame.com)
 * @version $Id: EmployeeRole.php 906 2011-10-20 02:38:33Z mmxie $
 */
class System_Model_EmployeeRole extends IG_Model
{

    protected $_data = array(
        'employee_id' => null,
        'role_id' => null,
    );



    /**
     * @param int $value
     * @return System_Model_EmployeeRole
     */
    public function setEmployeeId($value)
    {
        $this->employee_id = (int) $value;
        return $this;
    }

    public function getEmployeeId()
    {
        return $this->employee_id;
    }

    /**
     * @param int $value
     * @return System_Model_EmployeeRole
     */
    public function setRoleId($value)
    {
        $this->role_id = (int) $value;
        return $this;
    }

    public function getRoleId()
    {
        return $this->role_id;
    }


    public function getEmployeeByRole($roleId)
    {
        return $this->getMapper()->getEmployeeByRole($roleId);
    }

    public function getRoleByEmployee($employeeId)
    {
        return $this->getMapper()->getRoleByEmployee($employeeId);
    }

    public function saveRoleEmployee($roleId, $employees)
    {
        return $this->getMapper()->saveRoleEmployee($roleId, $employees);
    }

    public function saveEmployeeRole($employeeId, $roles )
    {
        return $this->getMapper()->saveEmployeeRole($employeeId, $roles);
    }
}